<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of NeoPersonaEventoFrontendForm
 *
 * @author mzamoran
 */
class NeoPersonaEventoFrontendForm extends NeoPersonaEventoForm {
    
    private $idEvento;
    
    function __construct($idEvento) {
        $this->idEvento = $idEvento;
        parent::__construct();
    }
    //put your code here
    public function configure() {
        parent::configure();
        $this->widgetSchema['neo_persona_id'] = new sfWidgetFormInputHidden();
        $this->widgetSchema['neo_evento_id'] = new sfWidgetFormInputHidden();
        $this->widgetSchema['estado'] = new sfWidgetFormInputHidden();
        
        $criteriaDistancia = new Criteria();
        $criteriaDistancia->add(NeoDistanciaEventoPeer::NEO_EVENTO_ID, $this->idEvento);
        
        $this->widgetSchema['neo_distancia_evento_id'] = new sfWidgetFormPropelChoice(array(
                    'model'    => 'NeoDistanciaEvento',
                    'add_empty' => true,
                    'criteria'  => $criteriaDistancia,
                    'label' => 'Distancia'
        ));
        
        $criteriaCategoria = new Criteria();
        $criteriaCategoria->add(NeoCategoriaEventoPeer::NEO_EVENTO_ID, $this->idEvento);
        
        $this->widgetSchema['neo_categoria_evento_id'] = new sfWidgetFormPropelChoice(array(
                    'model'    => 'NeoCategoriaEvento',
                    'add_empty' => true,
                    'criteria'  => $criteriaCategoria,
                    'label' => 'Distancia'
        ));
        
    }
}

?>
